package duoxiancheng;

public class Rundownload implements Runnable  {
    private String url;
    private String name;

    public Rundownload(String url, String name) {
        this.url = url;
        this.name = name;
    }

    @Override
    public void run() {
        WebDownload wd = new WebDownload();
        wd.download(url,name);
    }

    public static void main(String[] args) {
        Rundownload td1 = new Rundownload("https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=390522577,956060792&fm=173&app=25&f=JPEG?w=218&h=146&s=41022FF148532DC046ACD883030070C3","src/duoxiancheng/img/img1.png");
        Rundownload td2 = new Rundownload("https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1560684460,3157245279&fm=173&app=25&f=JPEG?w=218&h=146&s=B786B44C4C422457004C910B030070D3","src/duoxiancheng/img/img2.png");
        Rundownload td3 = new Rundownload("https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=686485702,3609692669&fm=173&app=25&f=JPEG?w=218&h=146&s=FEBA75C86E3398551CDD5C370300C0C0","src/duoxiancheng/img/img3.png");

        //启动
        new Thread(td1).start();
        new Thread(td2).start();
        new Thread(td3).start();
    }
}
